package com.warrior.respository;

import com.warrior.entity.TeamEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Shawn on 2017/3/15.
 */
@Repository
public interface ITeamRepository extends JpaRepository<TeamEntity, String>, PagingAndSortingRepository<TeamEntity, String> {

    /**
     * 根据队伍id查找一个队伍的信息
     * @param teamId
     * @return
     */
    TeamEntity findTeamEntityById(String teamId);

    Page<TeamEntity> findTeamByTeamStatusGreaterThan(int status,Pageable page);


    TeamEntity findTeamEntityByName(String teamName);

    TeamEntity findTeamEntityByLeaderMobile(String mobile);

}
